import request from "@/utils/request";

//查询轮播图列表
export function getCarousels() {
    return request({
      url: '/carousel/list',
      showSuccessMessage: false, // 自定义参数：不显示成功提示
      params:{
        pageNum:1,
        pageSize:5
      }
    })
  }

//添加轮播图
export function addCarousel(payload) {
    return request({
      url: '/carousel',
      method: 'post',
      data: payload
    })
  }

//删除轮播图
export function removeCarousel(carouselId) {
    return request({
      url: '/carousel/' + carouselId,
      method: 'delete'
    })
  }


//修改轮播图
export function updateCarousel(carouselId, payload) {
    return request({
      url: '/carousel/' + carouselId,
      method: 'put',
      data: payload
    })
  }